package com.bqtt.tumor.demo.entity;

import java.util.HashMap;
import java.util.Map;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.bqtt.tumor.demo.common.utility.InlineTools;


@Entity
@Table(name="treatment_method_def") 
public class TreatmentMethod  implements IDBEntity{

	@Id 
    @Column(name="treatment_method_def_id")    
    @GeneratedValue(strategy=GenerationType.IDENTITY) 
	private int treatment_method_def_id;
	
	@Column(name="method_name", length= 255)   
	private String method_name;
	
	@Column(name="method_english_name", length= 255)   
	private String method_english_name;
	
	@Column(name="price")  
	private double price;
	
	
	@Column(name="details", length= 1000)   
	private String details;
	
	@Column(name="recommand_hospital", length= 1000)   
	private String recommand_hospital;

	
	
	@Transient
	private String displayName;
	
	@Transient
	private String checked;
	
	public String getDisplayName() {
		return displayName;
	}

	
	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}
	
	
	public String getChecked() {
		return checked;
	}


	public void setChecked(String checked) {
		this.checked = checked;
	}


	@Override
	public Map<String, Object> getSQLValidAttributes() {
		// TODO Auto-generated method stub
		
		Map<String,Object> result  = new HashMap<String,Object>();
		
		if(!InlineTools.isEmpty(method_name))
		{
			result.put("method_name", method_name);
		}
		return result;
	}

	@Override
	public void fillStringField() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void fillDBfields() {
		// TODO Auto-generated method stub
		
	}

	public int getTreatment_method_def_id() {
		return treatment_method_def_id;
	}

	public void setTreatment_method_def_id(int treatment_method_def_id) {
		this.treatment_method_def_id = treatment_method_def_id;
	}

	public String getMethod_name() {
		return method_name;
	}

	public void setMethod_name(String method_name) {
		this.method_name = method_name;
	}

	public String getMethod_english_name() {
		return method_english_name;
	}

	public void setMethod_english_name(String method_english_name) {
		this.method_english_name = method_english_name;
	}

	public String getDetails() {
		return details;
	}


	public void setDetails(String details) {
		this.details = details;
	}


	public String getRecommand_hospital() {
		return recommand_hospital;
	}


	public void setRecommand_hospital(String recommand_hospital) {
		this.recommand_hospital = recommand_hospital;
	}


	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public TreatmentMethod() {
		super();
		displayName="none";
		checked=InlineTools.nocheckedStyle;
		// TODO Auto-generated constructor stub
	}
	
}
